home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Font;
- import java.awt.Graphics;
- import java.awt.Rectangle;
- import java.io.DataInputStream;
- import java.io.IOException;
-
- final class ColTxtFnt extends ColObj {
- private int m_txtSz = 12;
- private int m_txtFace;
- private String m_txtFont = new String();
- private ColGrph m_colGraphicObj;
- public Rectangle m_bounds = new Rectangle();
-
- public void draw(Graphics var1) {
- this.m_colGraphicObj.m_font = new Font(this.m_txtFont, this.m_txtFace, (int)((float)this.m_txtSz * this.m_colGraphicObj.m_mag));
- this.m_colGraphicObj.m_fontMtrc = this.m_colGraphicObj.m_appComp.getFontMetrics(this.m_colGraphicObj.m_font);
- var1.setFont(this.m_colGraphicObj.m_font);
- }
-
- public int getType() {
- return 12;
- }
-
- public Rectangle getBounds() {
- return this.m_bounds;
- }
-
- public ColTxtFnt(DataInputStream var1, int var2, ColGrph var3, Graphics var4) throws IOException {
- this.m_colGraphicObj = var3;
- if ((var2 & 8) != 0) {
- this.m_txtSz = var1.readInt();
- }
-
- if ((var2 & 16) != 0) {
- this.m_txtFace = var1.readInt();
- }
-
- for(int var5 = var1.readShort(); var5 > 0; --var5) {
- String var10001 = this.m_txtFont;
- this.m_txtFont = var10001 + (char)var1.readShort();
- }
-
- this.draw(var4);
- }
- }
-